package Models;

/**
 * @author Morten
 */
public class Machine
{
	private static int nextId = 100;
	private int id;
	private String name;
	private boolean available = true, activated = true;

	public Machine(String name)
	{
		this.edit(name, true);
		this.id = Machine.nextId;
		Machine.nextId++;
	}

	public void edit(String name, boolean available)
	{
		this.setName(name);
		this.setAvailable(available);
	}

	public int getId()
	{
		return id;
	}

	public String getName()
	{
		System.out.println("name "+ name);
		return name;
	}

	public boolean isActivated()
	{
		System.out.println("act "+activated);
		return activated;
	}

	public boolean isAvailable()
	{
		System.out.println("ava "+available);
		return available;
	}

	public void setActivated(boolean activated)
	{
		this.activated = activated;
	}

	public void setAvailable(boolean available)
	{
		this.available = available;
	}

	public void setName(String name)
	{
		this.name = name;
	}
}
